Repository navigation
Spread CKS nodes of each type across hosts by default - #14763
Open
bhouse-nexthop wants to merge 1 commit into
Open
bhouse-nexthop wants to merge 1 commit into
bhouse-nexthop wants to merge 1 commit into
Conversation
When a node type has no user-chosen affinity group, a new cluster gets a non-strict host anti-affinity group for it, so one host failure doesn't take out the whole control plane or every etcd member. - New account-scoped setting cloud.kubernetes.cluster.default.anti.affinity.enabled (default true) - Non-strict: nodes prefer different hosts; deploy and scale still work with fewer hosts than nodes - Groups: cks-<cluster uuid>-<worker|control|etcd>; control/etcd only with 2+ nodes (they don't scale) - User-chosen groups for a node type win; no default added for it - Stored in the existing node-type affinity map, so scale, add-node and replacement reuse them - Deleted with the cluster unless another cluster or a live VM still uses them - Skipped if the non-strict processor is excluded; existing clusters untouched Signed-off-by: Brad House <bhouse@nexthop.ai>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #14763 +/- ##
===========================================
Coverage 20.80% 20.81%
- Complexity 20919 20942 +23
===========================================
Files 6053 6053
Lines 548451 548513 +62
Branches 78719 73289 -5430
===========================================
+ Hits 114128 114193 +65
+ Misses 420958 420956 -2
+ Partials 13365 13364 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
New CKS clusters spread each node type across hosts by default. Builds on the per-node-type affinity groups from #12386.
cloud.kubernetes.cluster.default.anti.affinity.enabled, account scope, defaulttruenon-strict host anti-affinity: nodes prefer different hosts and are never blocked, so fewer hosts than nodes still workscks-<cluster uuid>-<worker|control|etcd>, owned by the cluster ownerNonStrictHostAntiAffinityProcessoris excludedWhy default on: non-strict only changes host ordering in the planner and never fails a deploy. Without it, a single host failure can take out every control node or every etcd member.
Fixes: #14762
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
KubernetesClusterManagerImplTest:KubernetesClusterManagerImplTest,KubernetesClusterActionWorkerTest,KubernetesClusterScaleWorkerTest,KubernetesClusterResourceModifierActionWorkerTest: all passHow did you try to break this feature and the system with this change?
updateKubernetesClusterAffinityGroupsreplaces the map as before; any default groups it drops are still deleted with the cluster